package com.sky.controller.mobile;

import com.sky.constant.MessageConstant;
import com.sky.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/shop")
@Api(tags = "小程序店铺操作相关接口")
@Log4j2
public class ShopMobileController {
    @Autowired
    RedisTemplate redisTemplate;
    @GetMapping("/status")
    @ApiOperation("获取店铺状态")
    public Result getPcSetmealStatus(){
        log.info("小程序");
        int status = (Integer) redisTemplate.opsForValue().get(MessageConstant.SHOPSTATUS);
        return Result.success(status);
    }
}
